package net.qiqbframework.modelling.command;

import net.qiqbframework.messaging.annotation.MessageHandler;
import net.qiqbframework.modelling.command.fetching.FetchMessage;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 *
 */
@Target({ElementType.METHOD, ElementType.ANNOTATION_TYPE})
@Retention(RetentionPolicy.RUNTIME)
@MessageHandler(messageType = FetchMessage.class)
public @interface FetchHandler {

    String commandName() default "";

    /**
     * 指定成员可以处理的消息负载的类型。消息的有效负载应可分配给此类型
     */
    Class<?> payloadType() default Object.class;
}
